Conversation
bajtos
left a comment
There was a problem hiding this comment.
Good start! I quickly skimmed trough the changes, will take another look tomorrow.
|
|
||
| ### `$ station --listen` | ||
|
|
||
| Open HTTP API. |
There was a problem hiding this comment.
Is this going to create another process providing only HTTP API for data created by another already running Station Core process? That seems like too many processes to me!
IMO, --listen should be an optional argument for the default command (station) that runs the main station process & modules.
There was a problem hiding this comment.
Maybe instead of --listen argument, we can implement the following flag:
- If
PORTis set to some value (including0), we start the HTTP server - If
PORTis not specified, we don't create any server.
It's less explicit than --listen, so maybe it's not a good idea. Posting it just for consideration.
There was a problem hiding this comment.
Good point, it's not a command it's just an option, meaning that it will run the basic $ station command, but also open an HTTP server.
IMO, --listen should be an optional argument for the default command (station) that runs the main station process & modules.
That's exactly how it is, I'm going to improve the README.
It's less explicit than --listen, so maybe it's not a good idea. Posting it just for consideration.
Those are my conerns as well. And we do read $PORT already, but only if --listen is set.
|
|
||
| Options: | ||
| -l, --listen Open HTTP API [boolean] | ||
| -p, --port HTTP API port [number] [default: 7834] |
There was a problem hiding this comment.
These two options are relevant only to station; they don't apply to station metrics and friends, right?
I also don't see the --port argument defined anywhere in bin/station.js.
There was a problem hiding this comment.
Oh, that's outdated. Will fix!
Closes #58